package cn.yunhe.services;

import cn.yunhe.dao.ITypeDaoMapper;

import cn.yunhe.util.SqlSessionFactoryUtil;
import org.apache.ibatis.session.SqlSession;

/**
 * 周依博
 */
public class AddLookTypeService {

    public boolean searchType(String type){
        SqlSession session = SqlSessionFactoryUtil.getSqlSession();
        ITypeDaoMapper typeDaoMapper = session.getMapper(ITypeDaoMapper.class);
        int result=typeDaoMapper.searchType(type);
        if (result>0){
            return true;
        }else {
            return false;
        }
    }


}
